﻿using System;
using System.Collections.Generic;
using DevExpress.Xpo;
using System.Text;

namespace BusinessObjects
{
    public class Khoa : XPObject
    {
        public Khoa()
            : base()
        {
            // This constructor is used when an object is loaded from a persistent storage.
            // Do not place any code here.
        }

        public Khoa(Session session)
            : base(session)
        {
            // This constructor is used when an object is loaded from a persistent storage.
            // Do not place any code here.
        }

        public override void AfterConstruction()
        {
            base.AfterConstruction();
            // Place here your initialization code.
        }

        //Fields
        string fTenKhoa = string.Empty;
        [Size(500)]
        public string TenKhoa
        {
            get { return fTenKhoa; }
            set { SetPropertyValue<string>("TenKhoa", ref fTenKhoa, value); }
        }
        [Association(@"GiangVienReferencesKhoa", typeof(GiangVien))]
        public XPCollection<GiangVien> GiangViens { get { return GetCollection<GiangVien>("GiangViens"); } }
        [Association(@"NganhHocReferencesKhoa", typeof(NganhHoc))]
        public XPCollection<NganhHoc> NganhHocs { get { return GetCollection<NganhHoc>("NganhHocs"); } }
        [Association(@"PhanQuyenReferencesKhoa", typeof(PhanQuyen))]
        public XPCollection<PhanQuyen> PhanQuyens { get { return GetCollection<PhanQuyen>("PhanQuyens"); } }
    }
}
